package com.findu.model;

import java.sql.Timestamp;
import java.util.HashMap;

public class FUFamilytreeMember {

    private long id;

    private String menberId;

    private boolean menberBeAlive;

    private String memberSurname;
    private String memberName;
    private String lastname;
    private String phone;
    private int menberSex;

    private int seniority;

    /**
     * 成员代数 以中心成员为基数为0 上下加减（上一辈 -1，下一辈+1）
     *
     * @author 杨卢银
     * @time 2015-09-11
     */
    private int generationNumber;

    /**
     * 成员字辈
     */
    private String generation;

    /**
     * 成员出生日期
     */
    private Timestamp birthday;

    /**
     * 死亡日期
     */
    private Timestamp deathDate;

    /**
     * 成员创建时间
     */
    private Timestamp createtime;

    /**
     * 成员头像
     */
    private String headImage;

    /**
     * 成员类型（0：在世，1：在世并且使用FindUAPP，2：死亡，3：死亡但是使用过FindUAPP）
     */
    private int type;

    /**
     * 成员找你用户id
     */
    private String fu_userId;

    /**
     * 成员所在家谱id
     */
    private String familytreeid;

    //2015-09-11 家谱成员添加新的字段
    /**
     * 成员QQ号
     */
    private String menber_qq;
    /**
     * 成员新浪微博
     */
    private String menber_sina;
    /**
     * 成员微信
     */
    private String menber_weixin;

    /**
     * 成员现在地址
     */
    private String menber_address;
    /**
     * 成员地区
     */
    private String menber_area;

    /**
     * 成员经度
     */
    private double longitude;
    /**
     * 成员纬度
     */
    private double latitude;
    /**
     * 成员出生地址 homeplace
     */
    private String menber_homeplace;

    /**
     * 成员出生地址经度
     */
    private double menber_homeplace_longitude;
    /**
     * 成员出生地址纬度
     */
    private double menber_homeplace_latitude;

    /**
     * 成员去世地址 homeplace
     */
    private String menber_deathplace;

    /**
     * 成员去世地址经度
     */
    private double menber_deathplace_longitude;
    /**
     * 成员去世地址纬度
     */
    private double menber_deathplace_latitude;

    /**
     * 成员学历
     */
    private String menber_education;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getMenberId() {
        return menberId;
    }

    public void setMenberId(String menberId) {
        this.menberId = menberId;
    }

    public boolean getMenberBeAlive() {
        return menberBeAlive;
    }

    public void setMenberBeAlive(boolean menberBeAlive) {
        this.menberBeAlive = menberBeAlive;
    }

    public String getMemberSurname() {
        return memberSurname;
    }

    public void setMemberSurname(String menberSurname) {
        this.memberSurname = menberSurname;
    }

    public String getMemberName() {
        return memberName;
    }

    public void setMemberName(String menberName) {
        this.memberName = menberName;
    }

    public String getLastname() {
        return lastname;
    }

    public void setLastname(String lastname) {
        this.lastname = lastname;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public int getMemberSex() {
        return menberSex;
    }

    public void setMemberSex(int menberSex) {
        this.menberSex = menberSex;
    }

    public int getGenerationNumber() {
        return generationNumber;
    }

    public void setGenerationNumber(int generationNumber) {
        this.generationNumber = generationNumber;
    }

    public String getGeneration() {
        return generation;
    }

    public void setGeneration(String generation) {
        this.generation = generation;
    }

    public int getSeniority() {
        return seniority;
    }

    public void setSeniority(int seniority) {
        this.seniority = seniority;
    }

    public Timestamp getBirthday() {
        return birthday;
    }

    public void setBirthday(Timestamp birthday) {
        this.birthday = birthday;
    }

    public Timestamp getDeathDate() {
        return deathDate;
    }

    public void setDeathDate(Timestamp deathDate) {
        this.deathDate = deathDate;
    }

    public String getHeadImage() {
        return headImage;
    }

    public void setHeadImage(String headImage) {
        this.headImage = headImage;
    }

    public Timestamp getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Timestamp createtime) {
        this.createtime = createtime;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getFu_userId() {
        return fu_userId;
    }

    public void setFu_userId(String fu_userId) {
        this.fu_userId = fu_userId;
    }

    public String getFamilytreeid() {
        return familytreeid;
    }

    public void setFamilytreeid(String familytreeid) {
        this.familytreeid = familytreeid;
    }

    public String getMenber_qq() {
        return menber_qq;
    }

    public void setMenber_qq(String menber_qq) {
        this.menber_qq = menber_qq;
    }

    public String getMenber_weixin() {
        return menber_weixin;
    }

    public void setMenber_weixin(String menber_weixin) {
        this.menber_weixin = menber_weixin;
    }

    public String getMenber_sina() {
        return menber_sina;
    }

    public void setMenber_sina(String menber_sina) {
        this.menber_sina = menber_sina;
    }

    public String getMenber_address() {
        return menber_address;
    }

    public void setMenber_address(String menber_address) {
        this.menber_address = menber_address;
    }

    public String getMenber_area() {
        return menber_area;
    }

    public void setMenber_area(String menber_area) {
        this.menber_area = menber_area;
    }

    public double getLatitude() {
        return latitude;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public double getLongitude() {
        return longitude;
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    public String getMenber_homeplace() {
        return menber_homeplace;
    }

    public void setMenber_homeplace(String menber_homeplace) {
        this.menber_homeplace = menber_homeplace;
    }

    public double getMenber_homeplace_latitude() {
        return menber_homeplace_latitude;
    }

    public void setMenber_homeplace_latitude(double menber_homeplace_latitude) {
        this.menber_homeplace_latitude = menber_homeplace_latitude;
    }

    public double getMenber_homeplace_longitude() {
        return menber_homeplace_longitude;
    }

    public void setMenber_homeplace_longitude(double menber_homeplace_longitude) {
        this.menber_homeplace_longitude = menber_homeplace_longitude;
    }

    public String getMenber_deathplace() {
        return menber_deathplace;
    }

    public void setMenber_deathplace(String menber_deathplace) {
        this.menber_deathplace = menber_deathplace;
    }

    public double getMenber_deathplace_latitude() {
        return menber_deathplace_latitude;
    }

    public void setMenber_deathplace_latitude(double menber_deathplace_latitude) {
        this.menber_deathplace_latitude = menber_deathplace_latitude;
    }

    public double getMenber_deathplace_longitude() {
        return menber_deathplace_longitude;
    }

    public void setMenber_deathplace_longitude(double menber_deathplace_longitude) {
        this.menber_deathplace_longitude = menber_deathplace_longitude;
    }

    public String getMenber_education() {
        return menber_education;
    }
//	public void setMenber_education(String menber_education) {
//		this.menber_education = menber_education;
//	}

    /**
     * 获取家谱成员信息
     *
     * @return
     */
    public HashMap<String, Object> getMap() {
        HashMap<String, Object> userMap = new HashMap<String, Object>();
        userMap.put("bealive", menberBeAlive);
        userMap.put("id", menberId);
        userMap.put("surname", memberSurname);
        userMap.put("name", memberName);
        userMap.put("lastname", lastname);
        userMap.put("sex", menberSex);
        String imageUrl = headImage;
        if (imageUrl != null) {
            imageUrl = "/service/useraction/image/getheadimage?imagename=" + headImage;
        } else {
            imageUrl = "";
        }
        userMap.put("imageUrl", imageUrl);
        userMap.put("phone", phone);
        userMap.put("seniority", seniority);
        userMap.put("generation", generation);
        userMap.put("generationNumber", generationNumber);
        userMap.put("birthday", birthday);
        userMap.put("deathdate", deathDate);
        userMap.put("time", createtime);
        userMap.put("type", type);
        userMap.put("familytreeid", familytreeid);
        userMap.put("findu_userId", fu_userId);
        //2015-09-11
        userMap.put("qq", menber_qq);
        userMap.put("weixin", menber_weixin);
        userMap.put("sina", menber_sina);

//		userMap.put("address", menber_address);
//		userMap.put("homeplace", menber_homeplace);
//		userMap.put("deathplace", menber_deathplace);
        HashMap<String, Object> locationMap = new HashMap<String, Object>();
        userMap.put("area", menber_area);
        locationMap.put("address", menber_address);
        locationMap.put("latitude", latitude);
        locationMap.put("longitude", longitude);

        locationMap.put("homeplace", menber_homeplace);
        locationMap.put("homeplace_latitude", menber_homeplace_latitude);
        locationMap.put("homeplace_longitude", menber_homeplace_longitude);

        locationMap.put("deathplace", menber_deathplace);
        locationMap.put("deathplace_latitude", menber_homeplace_latitude);
        locationMap.put("deathplace_longitude", menber_homeplace_longitude);
        userMap.put("position", locationMap);
        return userMap;
    }
}
